<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>date</title>
	</head>
	<body>
		<div id="div1"></div>
		<script>
			/* var timer = setInterval(fun1,1000);
			function fun1 () {
				console.log("javascript is ver fun");
			}
			var timer2 = setTimeout(fun2,10000);
			function fun2 () {
				console.log("timer out");
				clearInterval(timer);
			} */
			 //var timer3 = clearInterval(timer,10000);
			// function fun3 () {
			// 	console.log("清除计时器");
			// } 
			
			// 计时两分钟
			var count1 = setInterval(fun11,100);
			var num = 0;
			 var s=0;
			function fun11() {
				num++;
				if(num>=60){
					s++;
					num=0;
				}
				div1.innerHTML = s + ":"+num;
				if(s>2){
					clearInterval(count1);
				}
			}
			
		</script>
	</body>
</html>